<template>
	<view v-show="types" class="pages">
		<view class="item2">
			当班理货列表
		</view>
		<view class="item3">
			<view class="navsj">委托单号</view>
			<view class="navsj">货主</view>
			<view class="navsj">理货员</view>
			<view class="navsj">进港车辆</view>
		</view>
		<view  style="overflow: auto;height:200px;margin-bottom: 20px;">
			<view class="navs"  @click="openss(item)"  v-for="(item,index) in lhylhlist.dq" :key="item.id">
				<view class="item1">{{item.hdata.orderons}}</view>
				<view class="item1">{{item.hdata.hzdwidid}}</view>
				<view class="item1">{{item.lhbbidlist}}</view>
				<view class="item1">{{item.gbonlist.length}}辆</view>
			</view>
		</view>
		<view class="item2">
			超时列表
		</view>
		<view class="item3">
			<view class="navsj">委托单号</view>
			<view class="navsj">货主</view>
			<view class="navsj">理货员</view>
			<view class="navsj">进港车辆</view>
		</view>
		<view style="overflow: auto;height:200px;margin-bottom: 20px;">
		<view class="navs"  @click="openss(item)"  v-for="(item,index) in lhylhlist.cs" >
			<view class="item1">{{item.hdata.orderons}}</view>
			<view class="item1">{{item.hdata.hzdwid}}</view>
			<view class="item1">{{item.lhbbidlist}}</view>
			<view class="item1">{{item.gbonlist.length}}辆</view>
		</view>
		</view>
		<view v-show="opentype" class="ck">
			<view style="padding: 10px;margin-bottom: 10px; background-color: #3c77b7;overflow: hidden;">
				<view style="float: right;padding: 3px;font-size: 15px;color: #ffffff;font-weight: 600;"
					@click="opentypeqx">关闭</view>
			</view>
			<view style="padding: 10px;" class="iss">
				<view>委托单号：{{openinfo.orderons}}</view>
				<view>货主：{{openinfo.hzdwid}}</view>
				<view>货名：{{openinfo.hname}}</view>
				<view>授权时间：{{openinfo.sqstartime}}-{{openinfo.sqendtime}}</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		name:"lhy",
		props: {
			types: {
				type: Boolean,
				default: false,
				required: true
			},
			uid:{
				type: Number
			}
		},
		data() {
			return {
				uinfo:'',
				lhylhlist:[],
				opentype:false,
				openinfo:''
			};
		},
		created(){
			this.getlhylhlist()
				// this.getuserinfo(); 
		},
		methods: {
			openss(e){
				console.log(e)
				this.openinfo = e.hdata
				this.opentype = true
			},
			opentypeqx(){
				this.opentype = false
			},
			async getlhylhlist(){
				let data = {
					// uid:this.uinfo.id,
					id:this.uid
				}
				let res = await this.$api.getlhylhlist(data)
				this.lhylhlist = res.data.data
			},
			async getuserinfo(){
				let data = {
					// id:uni.getStorageSync('uid'),
					id:this.uid
				}
				let res =  await this.$api.getuserinfo(data)
				console.log(res.data.code)
				if(res.data.code==0){
					this.uinfo = res.data.data
					uni.setStorageSync('uid', res.data.data.id);
					uni.setStorageSync('cdtype', res.data.data.cdtype);	
					this.getlhylhlist()
				}			
			}
		}	
	}
</script>

<style lang="less" scoped>
	.pages{
		padding: 10upx;
		margin-top: 10upx;
	}
	.item2{
		font-size: 40upx;
		color: 	#3f3e41;
		height: 70upx;
		line-height: 70upx;
		font-weight: 600;
		margin-top: 10px;
		margin-bottom: 10px;
	}
	.item3{
		background-color: #3c77b7;
		
		color: #ffffff;
		overflow: hidden;
		height: 50px;
		// line-height: 70upx;
	}
	.navsj{
		float: left;
		width: 25%;
		text-align: center;
		height: 50px;
		line-height: 50px;
		font-size: 18px;
	}
	.item1{
		float: left;
		width:  25%;
		border:1px solid #3c77b7;
		text-align: center;
		line-height:50px;
		height: 50px;
		font-size:18px;
	}
	.navs{
		overflow: hidden;
		height: 50px;
	}
	.ck{
		z-index:999;
		-moz-opacity:1;
		opacity: 1;
		position: fixed;
		background-color: #ffffff;
		width: 90%;
		border-radius: 5px;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
	}
	.iss view{
		font-size: 20px;
		height: 30px;
		line-height: 30px;
	}
</style>